package com.jfire.codejson.function.impl.write.extra;

import java.text.SimpleDateFormat;
import java.util.Date;
import com.jfire.baseutil.collection.StringCache;
import com.jfire.codejson.function.JsonWriter;

public class DateWriter implements JsonWriter
{
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    
    @Override
    public void write(Object target, StringCache cache)
    {
        cache.append('\"').append(format.format((Date) target)).append('\"');
    }
    
}
